package com.lijiaxing.utils.enums;

public enum PermissionEnum {
    DASHBOARD(1, "控制台"),
    AUTH(2, "权限管理"),
    VPZZ(3, "陪诊管理"),
    ADMIN(4, "账号管理"),
    GROUP(5, "菜单管理"),
    STAFF(6, "陪护管理"),
    ORDER(7, "订单管理");
    private Integer key;
    private String value;

    PermissionEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static Integer getKey(String value) {
        for (PermissionEnum p : PermissionEnum.values()) {
            if (p.value.equals(value)) {
                return p.key;
            }
        }
        return null;
    }

    public static String getValue(Integer key) {
        for (PermissionEnum p : PermissionEnum.values()) {
            if (p.key.equals(key)) {
                return p.value;
            }
        }
        return null;
    }
}
